package adv6;

import java.io.*;
import java.util.Scanner;

public class Zifu {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		PrintWriter out = null;
		try {
			out = new PrintWriter("C:\\Users\\DARK\\Desktop\\c\\新建文本文档.txt");
			System.out.print("请输入字符（输入quit结束）：");
			String line = in.nextLine();
			while (!line.equals("quit")) {
				out.print(line);
				line = in.nextLine();
			}

		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		try {
			out.close();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		in.close();
		System.out.println("输入结束");
	}

}
